<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateComum.xhtml">
	<ui:define name="menu">
		<h:form>
		<p:menubar>
			<p:menuitem value="Home" url="/pages/diretor/index.jsf" />
			<p:menuitem value="Aula" url="/pages/diretor/aula/index.jsf" />
			<p:menuitem value="Sala" url="/pages/diretor/sala/index.jsf" />
			<p:menuitem value="Turma" url="/pages/diretor/turma/index.jsf" />  
			<p:menuitem value="Mudar de Vínculo" url="/pages/redirecionamento.jsf" rendered="#{mBAcessoUsuario.usuario.permissoes.size() > 1}"/>
			<p:menuitem value="Alterar Senha" oncomplete="senha.show()"/> 
			<p:menuitem value="Sair" url=" #{facesContext.externalContext.requestContextPath}/j_spring_security_logout"/>
		</p:menubar>
		</h:form>
		<p:dialog widgetVar="senha" id="senhaId" modal="true">
			<h:form>
				<h:panelGrid columns="2">
					<h:outputText value="Senha atual: " />
					<p:password value="#{mBAcessoUsuario.senha}"/>
					<h:outputText value="Nova senha: " />
					<p:password value="#{mBAcessoUsuario.novaSenha}"/>
					<h:outputText value="Repetir nova senha: " />
					<p:password value="#{mBAcessoUsuario.repeticaoSenha}"/>
					<p:commandButton action="#{mBAcessoUsuario.alterarSenha}" value="Alterar" ajax="false" oncomplete="senha.hide()"/>
					<p:commandButton value="Cancelar" oncomplete="senha.hide()"/>	
				</h:panelGrid>
				
			</h:form>
		</p:dialog>
	</ui:define>
</ui:composition>
</html>